@extends('admin.layout')
@section('title', $title)

@section('content')
 <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                主题管理
                <small>在这里, 你可以编辑你的主题
                @if(session('info'))
                    <span id="info" class="text-red">{{session('info')}}</span>
                @endif
                </small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="{{ url('/admin/index')}}"><i class="fa fa-dashboard"></i> 主页</a></li>
                <li><a href="{{ url('/admin/forum/index') }}">主题管理</a></li>
                <li class="active">编辑主题</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">快速编辑主题</h3>

                        </div><!-- /.box-header -->
                        <!-- form start -->
                        <form role="form" action="{{ url('/admin/forum/update')}} " method="post" enctype="multipart/form-data">
                        	{{ csrf_field()}}
                        <input type="hidden" name="uid" value="{{$data -> uid}}">
                        <input type="hidden" name="id" value="{{$data -> id}}">
                            <div class="box-body">
	                            @if (count($errors) > 0)
								    <div class="alert alert-danger">
								        <ul>
								            @foreach ($errors->all() as $error)
								                <li>{{ $error }}</li>
								            @endforeach
								        </ul>
								    </div>
								@endif
                            <div class="form-group">
                              主题:
                             </div>
                             @include("zhangmazi::ueditor")
                             <script id="ueditor_filed" name="fmpost" type="text/plain">{!! $data ->fmpost !!}</script>
                             <script>
                                var ueditor_full = UE.getEditor('ueditor_filed', {
                                'serverUrl' : '{{ route("zhangmazi_front_ueditor_service", ['_token' => csrf_token()]) }}'
                                });
                            </script>

                                 
                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">修改</button> 
                            </div>
                        </form>
                    </div><!-- /.box -->

                    <!-- Form Element sizes -->
                </div><!--/.col (left) -->
                <!-- right column -->
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
    <script type="text/javascript">
    
        window.onload = function()
        {
            $('#info').fadeOut(1000);  
        }

    </script>
@endsection
